﻿#!/usr/bin/python3
# -*- coding: utf-8 -*-
import mysql.connector
import config
config = config.Config.dbinfo().copy()


def query(sql):
    #Koble til databasen
    db = mysql.connector.Connect(**config)
    cursor = db.cursor()
    cursor.execute(sql)
    result = cursor.fetchall()
    rows = []
    for i in result:
        rows.append(i)
    return(rows)